package com.example.learn.hwod;

import java.util.Scanner;

public class _27水仙花数 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int len = sc.nextInt();
        int k = sc.nextInt();
        System.out.println(Math.pow(10,3));
        if (len<3||len>7||k<0){
            System.out.println(-1);
            return;
        }


    }
}
